package com.ssm.helong.shop.service;

import com.github.pagehelper.PageInfo;
import com.ssm.helong.shop.entity.Address;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AddressService {


    /**
     * 根据用户id查询地址
     * @param userId
     * @return
     */
    PageInfo<Address> selectAddress(Integer userId, int pageNo, int pageSize);

    /**
     * 根据地址编号修改地址信息
     * @param address
     * @return
     */
    Boolean updateAddress(Address address);

    /**
     * 添加新的地址
     * @param address
     * @return
     */
    Boolean addAddress(Address address);

    /**
     * 根据地址编号删除地址信息
     * @param id
     * @return
     */
    Boolean deleteAddress(Integer id);

    /**
     * 根据地址编号查询地址
     * @param id
     * @return
     */
   Address  selectOneAddress(Integer id);
}
